package PriorityQueue;

import java.util.LinkedList;

public class Text {
    public static void main(String[] args) {
        LinkedList<Entry> list1 = new LinkedList<>();

    }
    public static void main4(String[] args) {
        MinTopPile<Entry> p = new MinTopPile<>(10);
        p.offer(new Entry("text1",2));
        p.offer(new Entry("text2",4));
        p.offer(new Entry("text3",1));
        p.offer(new Entry("text4",5));
        p.offer(new Entry("text5",3));
        System.out.println(p.poll());
        System.out.println(p.poll());
        System.out.println(p.poll());
        System.out.println(p.poll());
        System.out.println(p.poll());

    }
    public static void main3(String[] args) {
        BigTopPile<Entry> q = new BigTopPile<>(10);

        q.offer(new Entry("Text4",6));
        q.offer(new Entry("Text1",4));
        q.offer(new Entry("Text2",3));
        q.offer(new Entry("Text3",2));
        q.offer(new Entry("Text4",5));
        q.offer(new Entry("Text5",1));
        q.offer(new Entry("Text6",77));
        q.offer(new Entry("Text6",77));
        q.offer(new Entry("Text6",77));
        System.out.println(q.poll());
        System.out.println(q.poll());
        System.out.println(q.poll());
        System.out.println(q.poll());
        System.out.println(q.poll());
        System.out.println(q.poll());
        System.out.println(q.poll());
        System.out.println(q.poll());
        System.out.println(q.poll());
        System.out.println();

        BigTopPile<Entry> qqq = new BigTopPile<>(10);
        qqq.offer(new Entry("Text4",6));
        qqq.offer(new Entry("Text1",4));
        qqq.offer(new Entry("Text2",3));
        qqq.offer(new Entry("Text3",2));
        qqq.offer(new Entry("Text4",5));
        qqq.offer(new Entry("Text5",1));
        qqq.offer(new Entry("Text6",77));
        qqq.offer(new Entry("Text6",77));
        qqq.offer(new Entry("Text6",77));
        System.out.println(qqq.poll1());
        System.out.println(qqq.poll1());
        System.out.println(qqq.poll1());
        System.out.println(qqq.poll1());
        System.out.println(qqq.poll1());
        System.out.println(qqq.poll1());
        System.out.println(qqq.poll1());
        System.out.println(qqq.poll1());
        System.out.println(qqq.poll1());

    }

    public static void main2(String[] args) {
        OrderedPriorityQueue<Entry> q = new OrderedPriorityQueue<>(10);
        q.offer(new Entry("Text1",4));
        q.offer(new Entry("Text2",3));
        q.offer(new Entry("Text3",2));
        q.offer(new Entry("Text4",5));
        q.offer(new Entry("Text5",1));
        System.out.println(q.poll());
        System.out.println(q.poll());
        System.out.println(q.poll());
        System.out.println(q.poll());
        System.out.println(q.poll());
    }
    public static void main1(String[] args) {
        UnorderedPriorityQueue<Entry> priorityQueue1 = new UnorderedPriorityQueue<>(10);
        priorityQueue1.offer(new Entry("Text1",4));
        priorityQueue1.offer(new Entry("Text2",3));
        priorityQueue1.offer(new Entry("Text3",2));
        priorityQueue1.offer(new Entry("Text4",5));
        priorityQueue1.offer(new Entry("Text5",1));
        System.out.println(priorityQueue1.poll());
        System.out.println(priorityQueue1.poll());
        System.out.println(priorityQueue1.poll());
        System.out.println(priorityQueue1.peek());
        System.out.println(priorityQueue1.peek());
    }
}
